﻿Imports System.IO

Public Class Tile

    Public Shared TileSize As Int32 = 18

    Public Shared Dirt As Bitmap
    Public Shared Grass As Bitmap
    Public Shared Air As Bitmap
    Public Shared Character As Bitmap

    Public Enum TileID
        Dirt
        Grass
        Air
        Character
    End Enum

    Public Shared Sub LoadImage()
        Try
            Dirt = Bitmap.FromFile(".\Dirt.png", True)
            Grass = Bitmap.FromFile(".\Grass.png", True)
            Air = Bitmap.FromFile(".\Air.png", True)
            Character = Bitmap.FromFile(".\Char.png", True)
        Catch ex As Exception
            Throw New FileNotFoundException("Ground tileset is missing!", "TileSet_Ground.png")
        End Try
    End Sub

End Class
